#ifndef FRAMEEDIT_H
#define FRAMEEDIT_H

//(*Headers(FrameEdit)
#include <wx/panel.h>
//*)
#include "FrameView.h"
#include "ToolPane.h"
#include <list>
using namespace std;

class FrameEdit: public FrameView
{
public:

    FrameEdit(wxWindow* parent,wxWindowID id=wxID_ANY,const wxPoint& pos=wxDefaultPosition,const wxSize& size=wxDefaultSize);
    virtual ~FrameEdit();
    void Save(wxString &name);
    void Open(wxString &name);
    void CanAddImage(bool f)
    {
        m_canAddImage = f;
    }
    void CanAddFrame(bool f)
    {
        m_canAddFrame = f;
    }
    void CanAddAction(bool f)
    {
        m_canAddAction = f;
    }
    bool CanEdit()
    {
        return m_canAddImage || m_canAddFrame || m_canAddAction;
    }
    //void AddFrame(SFrame *);
    //vo AddAction(SAction *);

    //(*Declarations(FrameEdit)
    //*)

protected:
    void OnLeftDown(wxMouseEvent &event);
    void OnMove(wxMouseEvent &event);
    void EnterWin(wxMouseEvent &event);
    void OnLeftUp(wxMouseEvent &event);
    //void OnTimer(wxTimerEvent &ev);
    void OnKeyDown(wxKeyEvent &event);
    void MoveSelect(int moveX,int moveY);
    //(*Identifiers(FrameEdit)
    //*)

private:
    bool m_drawSelRect;
    bool m_canAddImage;
    bool m_canAddFrame;
    bool m_canAddAction;
    int m_mouseX;
    int m_mouseY;
    wxRect m_selRect;
    SSelImage *m_pSelImage;
    SFrame *m_pSelFrame;
    SAction *m_pSelAction;
    //(*Handlers(FrameEdit)
    //*)
    //SFrame m_frame;
    DECLARE_EVENT_TABLE()
};

#endif
